import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    // 按需引入vant组件
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  css: {
    // 预处理器配置为less
    preprocessorOptions: {
      less: {
        math: 'always'
      },
    },
  },
})
